package com.easybuilder.core.schedultask.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class MyJob3 implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("定时任务3执行中！" + new Date());
    }


    public static void main(String[] args) {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DAY_OF_MONTH, -1);
        String dateStr = new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime());
        System.out.println(dateStr);
    }
}
